cc.Class({
    extends: cc.Component,

    properties: {
        prefab: cc.Prefab,
        text: {
            default: '', notify (value) {
                this.btnLabel.string = this.text;
            },
        },
        btnLabel: { default: null, visible: false, type: cc.Label },
    },


    start () {
        this.btnLabel.string = this.text;
        this.node.on(cc.Node.EventType.TOUCH_END, (event) => {
            if (window.TestScene && this.prefab) {
                window.TestScene.showEffect(this.prefab);
            }
        });
    },

    // update (dt) {},
});
